using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Threading;
using System.Diagnostics;

namespace StartupHelper
{
    class Program
    {
        const string StartupApps = "StartupApps.txt";
        static void Main(string[] args)
        {
            if (!File.Exists(StartupApps))
                return;

            string[] apps = File.ReadAllLines(StartupApps);
            foreach(string app in apps)
            {
                string fileName = app.Trim();
                if (!File.Exists(fileName))
                    continue;

                Thread.Sleep(30000);//30s

                try
                {
                    ProcessStartInfo info = new ProcessStartInfo();
                    info.FileName = fileName;
                    info.WindowStyle = ProcessWindowStyle.Minimized;
                    Process.Start(info);
                }
                catch
                {

                }                
            }
        }
    }
}
